package cn.hy.guava.demo;

import cn.hy.guava.bus.EventBusCenter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderService {
    @Autowired
    private EventBusCenter eventBusCenter;

    public void createOrder() {
        // 处理创建订单
        // ...
        // 发送同步步事件
        eventBusCenter.postSync(new OrderCreatedEvent(1L));
        // throw new RuntimeException("1");
    }

    public static void main(String[] args) {
    }


}
